<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="TransaccionCreateDlg" widgetVar="TransaccionCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.CreateTransaccionTitle}">

            <h:form id="TransaccionCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{transaccionController.selected != null}">

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_codigo}" for="codigo" />
                        <p:inputText id="codigo" value="#{transaccionController.selected.codigo}" 
                                     title="#{bundle.CreateTransaccionTitle_codigo}" />

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_fecha}" for="fecha" />
                        <p:calendar id="fecha" pattern="dd/MM/yyyy" 
                                    value="#{transaccionController.selected.fecha}" 
                                    title="#{bundle.EditTransaccionTitle_fecha}" required="true" 
                                    requiredMessage="#{bundle.EditTransaccionRequiredMessage_fecha}" showOn="button"/>

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_totalMonto}" for="totalMonto" />
                        <p:inputText id="totalMonto" value="#{transaccionController.selected.totalMonto}" 
                                     title="#{bundle.CreateTransaccionTitle_totalMonto}" required="true" 
                                     requiredMessage="#{bundle.CreateTransaccionRequiredMessage_totalMonto}"/>

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_creationDate}" for="creationDate" />
                        <p:calendar id="creationDate" pattern="dd/MM/yyyy HH:mm:ss" value="#{transaccionController.selected.creationDate}" title="#{bundle.EditTransaccionTitle_creationDate}" required="true" requiredMessage="#{bundle.EditTransaccionRequiredMessage_creationDate}" showOn="button"/>

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_createdBy}" for="createdBy" />
                        <p:inputText id="createdBy" value="#{transaccionController.selected.createdBy}" 
                                     title="#{bundle.CreateTransaccionTitle_createdBy}" required="true" 
                                     requiredMessage="#{bundle.CreateTransaccionRequiredMessage_createdBy}"/>

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_lastUpdateDate}" for="lastUpdateDate" />
                        <p:calendar id="lastUpdateDate" pattern="dd/MM/yyyy HH:mm:ss" 
                                    value="#{transaccionController.selected.lastUpdateDate}" 
                                    title="#{bundle.EditTransaccionTitle_lastUpdateDate}"  showOn="button"/>

                        <p:outputLabel value="#{bundle.CreateTransaccionLabel_lastUpdateBy}" for="lastUpdateBy" />
                        <p:inputText id="lastUpdateBy" value="#{transaccionController.selected.lastUpdateBy}" 
                                     title="#{bundle.CreateTransaccionTitle_lastUpdateBy}" required="true" 
                                     requiredMessage="#{bundle.CreateTransaccionRequiredMessage_lastUpdateBy}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{transaccionController.saveNew}" value="#{bundle.Save}" 
                                     update="display,:TransaccionListForm:datalist,:growl" 
                                     oncomplete="handleSubmit(xhr,status,args,TransaccionCreateDialog);"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="TransaccionCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
